'''#!/usr/bin/python
"""Realtime Pyro events client.

TODO: I think this is obsolete"""
if __name__ == "__main__":

    from misc import misc
    from system import tradezone
    import system.navalasystem as na

    na.vala.flagLocalDB = True
    na.vala.Startup()

not working rr = rtclasses.RealtimeRecorder()
    rr.stockset = "Realtime"
    rr.infoGetter = tradezone.GetHTTPClientProxy()


    ## MISSING:
    # - start quotesubscriber in a new thread
    # - implement the recording thing... can only test this on Monday :<<


    print "Please press \"0\" to exit now, \"1\" to run"
    while True:
        k = misc.ReadSingleKeypress()
        print k
        if k == "0":
            break
        elif k == "1":
            print "Starting..."
            try:
                rr.Start()
                break
            except:
                print "Abnormal behaviour (well, yes) trying to start RealtimeRecorder"
                raise

    if k == "1":
        print "Running... now press \"2\" when you want to finish"
        while True:
            k = misc.ReadSingleKeypress()
            print k
            if k == "2":
                print "Finishing..."
                rr.Finish()
                break
        print "Finished ok, I hope all went well with your realtime streaming/recording!"

'''
